<template>
  <div id="app">
    <router-view class="router-view"/>
  </div>
</template>

<style lang="scss">
.jsoneditor {
  border-color: #ccc !important;

  .jsoneditor-menu {
    background-color: #ccc !important;
    border-bottom-color: #ccc;

    .jsoneditor-poweredBy, .jsoneditor-modes, .jsoneditor-compact {
      display: none;
    }

    .jsoneditor-format {
      width: auto !important;
      text-indent: 26px;
      padding: 0 5px !important;

      &::after {
        content: "格式化";
      }
    }
  }
}

*:focus-visible {
  outline: none;
}

body, html {
  margin: 0;
}

body {
  height: 100vh;
  width: 100vw;
}

.el-tabs {
  height: 100%;

  .el-tabs__content {
    height: calc(100% - 55px);

    .el-tab-pane {
      height: 100%;
      overflow-y: auto;
    }
  }
}

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  height: 100%;

  .router-view {
    height: 100%;
  }

  .bds {
    input, textarea {
      font-family: Consolas, serif;
    }
  }
}

.top-bar {
  text-align: right;
  margin-right: 20px;
}

.list-item {
  user-select: none;
  padding: 10px 10px 10px 20px;
  line-height: 25px;
  display: flex;
  align-items: center;
  border-top: 1px solid #ccc;
  box-sizing: border-box;

  &:nth-child(1) {
    border-top: 0;
  }

  &:hover {
    background-color: aliceblue;
    cursor: pointer;

    .btn-box {
      visibility: visible;
    }
  }

  &.active {
    background-color: aliceblue;
    //color: white;
  }

  & ~ .children-box .list-item {
    padding-left: 50px;
  }

  &.over {
    background-color: #79bbff;
    color: white;
  }

  &.over-top {
    box-shadow: 0 -3px 0 0 #79bbff;
  }

  &.over-bottom {
    box-shadow: 0 3px 0 0 #79bbff;
  }

  &.canmove {
    transition-duration: 0.3s;
  }

  .mc-box {
    flex: 1;
    overflow: hidden;
  }

  .btn-box {
    display: flex;
    visibility: hidden;

    .btn {
      height: 24px;
      width: 24px;
      display: inline-block;
      background-position: center;
      background-repeat: no-repeat;
      background-size: 18px;

      &:hover {
        background-color: rgba(121, 187, 255, 0.3);
        opacity: .7;
      }

      &.edit-btn {
        background-image: url("~@/assets/svg/edit.svg");
      }

      &.delete-btn {
        background-image: url("~@/assets/svg/delete.svg");
      }
    }
  }
}

.el-divider--vertical {
  height: 100% !important;
}
</style>
